package com.gigi.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@ApiModel("考勤记录实体")
@Data
@ContentRowHeight(30)  // 设置内容行高
@HeadRowHeight(30) // 设置头行高
@ColumnWidth(32) // 设置列宽
@ContentStyle(horizontalAlignment = HorizontalAlignment.LEFT) // 设置内容对其方式
@ContentFontStyle(fontHeightInPoints = 18) // 设置内容字体大小
@HeadFontStyle(fontHeightInPoints = 18) // 设置头字体大小
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 40) // 设置头背景颜色
public class SignInRecordDO {

    @ExcelIgnore
    private Long id;

    // 学生id
    @ExcelIgnore
    @NotNull(message = "用户id不能为空")
    private Long userId;

    @ExcelProperty("姓名")
    private String studentName;

    @ExcelProperty("学号")
    private Long studentNo;

    @ExcelProperty("班级")
    private String className;

    @ExcelIgnore
    private String studentPic;

    @ExcelIgnore
    @NotNull(message = "签到id不能为空")
    private Long signInId;

    @ExcelIgnore
    private String pic;

    @ExcelIgnore
    private Integer state;

    @ExcelProperty("签到状态")
    private String stateDesc;

    @ExcelIgnore
    private LocalDateTime signInTime;

    @ExcelProperty("签到时间")
    private String signInTimeStr;

}
